<?php

namespace seecms\lib\builder\button;

use seecms\lib\builder\modal\Confirm;
use seecms\SeeLang;

class DeleteButton extends Button
{
    protected $text = 'delete';

    protected $style = 'layui-btn-danger';

    protected $url = 'delete';

    protected $map = [
        'id' => 'id'
    ];

    public function getConfirm(): Confirm
    {
        return $this->confirm ?: Confirm::init(SeeLang::dialog('miss_tips'), SeeLang::dialog('confirm_delete'));
    }
}